// vue.config.js
module.exports = {

    css: {
        loaderOptions: {
            less: {
                modifyVars: {
                    /* less 变量覆盖，用于自定义 ant design 主题 */
                    'primary-color': '#1890FF',
                    'link-color': '#1890FF',
                    'border-radius-base': '4px',
                },
                javascriptEnabled: true,
            }
        }
    },

    devServer: {
        proxy: {
            '/exam/api': {
                target: 'http://localhost:60903', // 后台请求地址
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    '^/exam/api': '/api'
                }
            },
            '/exam/imgs': {
                target: 'http://localhost:60903', // 后台请求地址
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    '^/exam/imgs': '/imgs'
                }
            },
            // '/exam/api': {
            //     target: 'http://121.196.96.54:90', // 后台请求地址
            //     ws: true,
            //     changeOrigin: true,
            //     pathRewrite: {
            //         '^/exam/api': '/exam/api'
            //     }
            // },
            // '/exam/imgs': {
            //     target: 'http://121.196.96.54:90', // 后台请求地址
            //     ws: true,
            //     changeOrigin: true,
            //     pathRewrite: {
            //         '^/exam/imgs': '/exam/imgs'
            //     }
            // },
        }
    }
}